package com.zxpt.quetion.common;


public enum questionType {

    HEAD("标题", "head"), RADIO("单选题", "radio"), CHECKBOX("多选题", "checkbox"), TEXTAREA("文本题", "textarea"),CHAINED("级联题", "chained");
    // 成员变量
    private String china;
    private String eng;
    // 构造方法
    private questionType(String china, String eng) {
        this.china = china;
        this.eng = eng;
    }
    // 普通方法
    public static String getChina(String eng) {
        for (questionType c : questionType.values()) {
            if (eng.equals(c.getEng())) {
                return c.china;
            }
        }
        return null;
    }

    public String getChina() {
        return china;
    }

    public void setChina(String china) {
        this.china = china;
    }

    public String getEng() {
        return eng;
    }

    public void setEng(String eng) {
        this.eng = eng;
    }
}
